<?php

    function returnContinuity($pp){ 
        $st = explode(',', $pp);
        $i = $st[0];
        $j = '';
        $m = '';
        foreach ($st as $key => $var){
            if ($i == $var) {
                continue;
            }
            $n = $key-1;
            if (($var-$st[$n]) == 1) {
                $m = $var;
                continue;
            }
            if ($i != $st[$n]){
                $j .= $i.'-'.$st[$n].',';
            }else{
                $j .= $i.',';
            }
            $i = $var;
        }
        if ($i>$m){
            $j .= $i;
        }else{
            $j .= $i.'-'.$m;
        }
        return $j;
    }

    function returnSpecifcShow($show){
        $arr = [
            'yes' => '',
            'no' => '(隐藏)',
        ];
        return $arr[$show];
    }

    function returnIdentity($userId){
        return \app\atxunda\model\KnowUser::userAdminDispose($userId);
    }

    function returnAdminName($admin_id){
        return \think\Db::table('admin')->where('admin_id',$admin_id)->value('admin_name');
    }